package com.yw.atp.model;
import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.yw.atp.Constant;


@Entity
@Table(name=Constant.DB_PREFIX+"atpImage")
@NamedQueries({
    @NamedQuery(name = "atpImage.selImg", 
        query = "select i FROM AtpImage i where i.path like :imgSrc"
    )
})
public class AtpImage implements IDEntity{
	private static final long serialVersionUID = 1L;

	@Id
    @GeneratedValue
    private Integer id;
	private String path;
	@OneToMany(mappedBy="atpImage",fetch=FetchType.LAZY,cascade=CascadeType.PERSIST)
    private Set<Command> commandSet;
	private String status = "0";
	private Date updateAt;
	public Date getUpdateAt() {
		return updateAt;
	}

	public void setUpdateAt(Date updateAt) {
		this.updateAt = updateAt;
	}
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	public Set<Command> getCommandSet() {
		return commandSet;
	}

	public void setCommandSet(Set<Command> commandSet) {
		this.commandSet = commandSet;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return null;
	}
	
}
